package com.xiaofeng.pochi.repository;

import com.xiaofeng.pochi.pojo.ShopProductCollection;
import org.springframework.data.mongodb.repository.MongoRepository;

import java.util.List;

/**
 * Created with IntelliJ IDEA
 *
 * @Author: chc
 * @Date: 2022/08/28/21:43
 * @Description:
 */
public interface ShopProductCollectionRepository extends MongoRepository<ShopProductCollection, Long> {

    /**
     * 根据商品编号和创建人查询
     * @param productId 商品编号
     * @param createBy 创建人
     * @return
     */
    ShopProductCollection getByProductIdAndCreateBy(Long productId, String createBy);

    List<ShopProductCollection> getByProductIdInAndCreateBy(List<Long> productIds, String username);
}
